﻿#pragma once
class DialogManager
{
public:
	DialogManager() = default;
	~DialogManager();
	static DialogManager& Singleten(){ static DialogManager g_DialogManager; return g_DialogManager; }

	void Init();
	CDXUTDialog* GetDialog(std::wstring str);
	void DialogManager::InitResource(CDXUTDialogResourceManager* pManager);
	HRESULT OnD3D9CreateDevice(IDirect3DDevice9* pd3dDevice);
	HRESULT ResetDevice();
	HRESULT OnRender(float fElapsedTime);
	bool MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	static void WINAPI StaticOnEvent(UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserData);

private:
	std::unordered_map<std::wstring, CDXUTDialog*> mapDialogManager;
	std::list<CDXUTDialog*> listFocusManager;
};